@isTest
private class ExWareQueryControllerTest {
    static testMethod void testMethod1() {
        
        Account acc = TestUtils.createAccount();
        acc.NCICCode__c = 'xxxxdddd';
        acc.Level__c = '一级医院';
        insert acc;


        CooperationStandard__c cs = new CooperationStandard__c();
        cs.Account__c = acc.Id;
        insert cs;

        ProductStructure__c ps = new ProductStructure__c();
        ps.Classify3__c = '仪器';
        insert ps;
        Product__c p1 = TestUtils.createProduct();
        p1.Category0__c = '仪器';
        p1.ProductStructure__c = ps.Id;
        p1.PriceCompany__c = 'MKSY';
        p1.pk_invbasdoc__c = '000001';
        p1.RecordTypeId = Utils.getRecordTypeIdByDevNameAndObjName('NCProduct', 'Product__c');
        insert p1;


        TaskEquipment__c  te = new TaskEquipment__c();
        te.Standers__c = cs.Id;
        te.InstrumentName__c = p1.Id;
        insert te;



        ExWareQueryController eqc = new ExWareQueryController();
        eqc.taskId = cs.Id;
        eqc.init();

        Map<String,String> pm = new Map<String ,String>();
        pm.put('djristart', '2018-08-08');

        eqc.paramJson = EncodingUtil.urlEncode(JSON.serialize(pm), 'UTF-8');
        System.debug(eqc.paramJson);
        eqc.queryExware();
        eqc.getEquips();
        eqc.saveJson = eqc.eqJson;
        eqc.save();


    }
}